package com.cevent.zhanniu.manager.controller;/**
 * Created by Cevent on 2020/11/17.
 */

import com.cevent.zhanniu.server.domain.AdminTestEntity;
import com.cevent.zhanniu.server.domain.ZncmsAdmin;
import com.cevent.zhanniu.server.service.AdminTestService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author cevent
 * @description 测试跳转
 * @date 2020/11/17 14:29
 */
@RestController
public class TestController {
    @RequestMapping("/test")
    public String testManager(){
        return "eureka module --Manager-- 启动成功";
    }

    //1.查询测试admin
    @Resource
    private AdminTestService adminTestService;
    @GetMapping("/testAdminList")
    public List<AdminTestEntity> testAdminList(){
        return adminTestService.testAdminList();
    }

    //2.倒序查询
    @RequestMapping("/testAdminDESC")
    public List<ZncmsAdmin> exampleAdminList(){
        return adminTestService.order_list();
    }

    //3.根据id查询
    @RequestMapping("/testAdminById")
    public List<ZncmsAdmin> exampleAdminById(){
        return adminTestService.selectById();
    }
}
